<html>

<head>
    <title>LayaProject</title>
    <meta charset='utf-8' />
    <meta name='renderer' content='webkit' />
    <meta name='viewport'
        content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no' />
    <meta name='apple-mobile-web-app-capable' content='yes' />
    <meta name='full-screen' content='true' />
    <meta name='x5-fullscreen' content='true' />
    <meta name='360-fullscreen' content='true' />
    <meta http-equiv='expires' content='0' />
    <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1' />
    <meta http-equiv='expires' content='0' />
    <meta http-equiv='Cache-Control' content='no-siteapp' />
</head>

<body style="margin: 0;background-color: #888888;color: #fff;">
    <!-- Splash screen start -->
    <style type="text/css">
        #splash {
            position: absolute;
            height: 100%;
            width: 100%;
            z-index: 99999999;
            transition: opacity ease-in-out 300ms;
            transform-origin: left top;
            background-color: #888888;
        }
        
        .splash-image {
            position: absolute;
            height: 100%;
            width: 100%;
            background-repeat: no-repeat;
            background-position: 50% 30%;
            background-image: url('splash.png');
            background-size: auto;
        }

        .powered-by {
            display: flex;
            justify-content: center;
            align-items: flex-end;
            width: 100%;
            height: 90%;
            color: #fff;
            text-shadow: 1px 1px 2px rgb(0, 0, 0);
            font-size: 16px;
        }
    </style>
    <div id="splash">
        <div class="splash-image">
            <div class="powered-by">
                <p>Powered by LayaAir Engine</p>
            </div>
        </div>
    </div>
    <script>
        (function() {
            let splash = document.getElementById('splash');
            let sm = "none";
            let du = parseInt("1000");
            let ss = performance.now();

            function fit() {
                let flag = 0;
                if (sm == "horizontal")
                    flag = window.innerWidth < window.innerHeight ? 1 : 0;
                else if (sm == "vertical")
                    flag = window.innerWidth > window.innerHeight ? 2 : 0;

                if (flag != 0) {
                    splash.style.width = window.innerHeight + "px";
                    splash.style.height = window.innerWidth + "px";

                    if (flag == 1) {
                        splash.style.transform = "rotate(90deg)";
                        splash.style.left = window.innerWidth;
                    }
                    else {
                        splash.style.transform = "rotate(-90deg)";
                        splash.style.top = window.innerHeight;
                    }
                }
                else {
                    splash.style.transform = "";
                    splash.style.width = "100%";
                    splash.style.height = "100%";
                    splash.style.left = "0px";
                    splash.style.top = "0px";
                }
            }

            function hide() {
                window.removeEventListener("resize", fit);
                delete window.hideSplashScreen;

                let t = du - (performance.now() - ss);
                if (t < 0) t = 0;
                setTimeout(() => {
                    splash.style.opacity = 0;
                    setTimeout(() => splash.parentElement.removeChild(splash), 300);
                }, t);
            }

            function onProgress(progress) {
            }

            window.addEventListener("resize", fit);
            window.hideSplashScreen = hide;
            window.onSplashProgress = onProgress;

            fit();
        })();
    </script>
    <!-- Splash screen end -->

    <script type="text/javascript" src="laya.core.js"></script>
    <script type="text/javascript" src="laya.ui.js"></script>
    <script type="text/javascript" src="bundle.js"></script>
    <script type="text/javascript" src="index.js"></script>
    <script src="../stats.js"></script>
</body>

</html>